<template>
  <footer class="footer">
    <span class="todo-count">剩余<strong>{{showList.length}}</strong></span>
    <ul class="filters">
      <li>
        <a :class="{selected:$store.state.todomodule.isOk=='all'}" href="javascript:;" @click="setIsOk('all')">全部</a>
      </li>
      <li>
        <a :class="{selected:$store.state.todomodule.isOk=='no'}" href="javascript:;" @click="setIsOk('no')">未完成</a>
      </li>
      <li>
        <a :class="{selected:$store.state.todomodule.isOk=='yes'}" href="javascript:;" @click="setIsOk('yes')">已完成</a>
      </li>
    </ul>
    <button class="clear-completed" @click="clearIsOk">清除已完成</button>
  </footer>
</template>

<script>
import { mapMutations,mapGetters } from 'vuex'
export default {
    computed:{
       ...mapGetters("todomodule",["showList"]),
    },
methods:{
    ...mapMutations("todomodule",["setIsOk","clearIsOk"])
},

}
</script>